package com.algorithm;

import java.util.Scanner;
@SuppressWarnings("all")
public class YangHui {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int[][] arr=new int[n][n];

        for (int i=0;i<n;i++){
            for (int j=0;j<n;j++){
                if (i==j||j==0)
                    arr[i][j]=1;
                else{
                    if (i-1>=0&&j-1>=0)
                    arr[i][j]=arr[i-1][j]+arr[i-1][j-1];
                }
            }
        }

        for (int i=0;i<n;i++){
            for (int j=0;j<n;j++){
                if (arr[i][j]!=0)
                System.out.print(arr[i][j]+" ");
            }
            System.out.println();
        }
    }
}
